package com.baobao.domain;

import java.io.Serializable;

import java.util.Calendar;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class AskleavePK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public AskleavePK() {
	}

	/**
	 */

	@Column(name = "parentPhone", length = 40, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String parentPhone;
	/**
	 */

	@Column(name = "studentId", length = 40, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String studentId;
	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "applyTime", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Calendar applyTime;

	/**
	 */
	public void setParentPhone(String parentPhone) {
		this.parentPhone = parentPhone;
	}

	/**
	 */
	public String getParentPhone() {
		return this.parentPhone;
	}

	/**
	 */
	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	/**
	 */
	public String getStudentId() {
		return this.studentId;
	}

	/**
	 */
	public void setApplyTime(Calendar applyTime) {
		this.applyTime = applyTime;
	}

	/**
	 */
	public Calendar getApplyTime() {
		return this.applyTime;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((parentPhone == null) ? 0 : parentPhone.hashCode()));
		result = (int) (prime * result + ((studentId == null) ? 0 : studentId.hashCode()));
		result = (int) (prime * result + ((applyTime == null) ? 0 : applyTime.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof AskleavePK))
			return false;
		AskleavePK equalCheck = (AskleavePK) obj;
		if ((parentPhone == null && equalCheck.parentPhone != null) || (parentPhone != null && equalCheck.parentPhone == null))
			return false;
		if (parentPhone != null && !parentPhone.equals(equalCheck.parentPhone))
			return false;
		if ((studentId == null && equalCheck.studentId != null) || (studentId != null && equalCheck.studentId == null))
			return false;
		if (studentId != null && !studentId.equals(equalCheck.studentId))
			return false;
		if ((applyTime == null && equalCheck.applyTime != null) || (applyTime != null && equalCheck.applyTime == null))
			return false;
		if (applyTime != null && !applyTime.equals(equalCheck.applyTime))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("AskleavePK");
		sb.append(" parentPhone: ").append(getParentPhone());
		sb.append(" studentId: ").append(getStudentId());
		sb.append(" applyTime: ").append(getApplyTime());
		return sb.toString();
	}
}
